

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>The connections module content &mdash; buzzRTShare v1.0.1 documentation</title>
    <link rel="stylesheet" href="_static/default.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '',
        VERSION:     '1.0.1',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="top" title="buzzRTShare v1.0.1 documentation" href="index.html" />
    <link rel="next" title="The dbclasses module content" href="dbclasses.html" />
    <link rel="prev" title="The callback module content" href="callback.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="dbclasses.html" title="The dbclasses module content"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="callback.html" title="The callback module content"
             accesskey="P">previous</a> |</li>
        <li><a href="index.html">buzzRTShare v1.0.1 documentation</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="module-connections">
<span id="the-connections-module-content"></span><h1>The <cite>connections</cite> module content<a class="headerlink" href="#module-connections" title="Permalink to this headline">¶</a></h1>
<div class="section" id="the-unsubscribethis-function">
<h2>The <tt class="docutils literal"><span class="pre">unsubscribeThis</span></tt> function<a class="headerlink" href="#the-unsubscribethis-function" title="Permalink to this headline">¶</a></h2>
<dl class="function">
<dt id="connections.unsubscribeThis">
<tt class="descclassname">connections.</tt><tt class="descname">unsubscribeThis</tt><big>(</big><em>self</em>, <em>id</em><big>)</big><a class="headerlink" href="#connections.unsubscribeThis" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the status code of a urlfetch of /pshbconnect.
Receive the current user id by id parameter and call a POST
method to /pshbconnect with as parameters id and unsubscribe mode.</p>
</dd></dl>

</div>
<div class="section" id="the-pshbconnect-class">
<h2>The <tt class="docutils literal"><span class="pre">PSHBConnect</span></tt> class<a class="headerlink" href="#the-pshbconnect-class" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="connections.PSHBConnect">
<em class="property">class </em><tt class="descclassname">connections.</tt><tt class="descname">PSHBConnect</tt><a class="headerlink" href="#connections.PSHBConnect" title="Permalink to this definition">¶</a></dt>
<dd><p>Extend the webapp.RequestHandler.
Class PSHBConnect is mapped on /pshbconnect request.</p>
<dl class="method">
<dt id="connections.PSHBConnect.get">
<tt class="descname">get</tt><big>(</big><em>mode=None</em><big>)</big><a class="headerlink" href="#connections.PSHBConnect.get" title="Permalink to this definition">¶</a></dt>
<dd><p>Wrapper method. If this class is called with GET method the request
is forwarded to the post method.</p>
</dd></dl>

<dl class="method">
<dt id="connections.PSHBConnect.post">
<tt class="descname">post</tt><big>(</big><big>)</big><a class="headerlink" href="#connections.PSHBConnect.post" title="Permalink to this definition">¶</a></dt>
<dd><p>The method called when /pshbconnect is called with POST method.
It performs subscribe and unsubscribe of the hub (see <a class="reference external" href="http://http://code.google.com/p/pubsubhubbub/">http://http://code.google.com/p/pubsubhubbub/</a>).
Receive userID and mode from POST call.
Return the userID managed.</p>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="the-twitterconnect-class">
<h2>The <tt class="docutils literal"><span class="pre">TwitterConnect</span></tt> class<a class="headerlink" href="#the-twitterconnect-class" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="connections.TwitterConnect">
<em class="property">class </em><tt class="descclassname">connections.</tt><tt class="descname">TwitterConnect</tt><a class="headerlink" href="#connections.TwitterConnect" title="Permalink to this definition">¶</a></dt>
<dd><p>Extend the webapp.RequestHandler.
Class TwitterConnect is mapped on /twitterconnect/(.*) request.</p>
<dl class="method">
<dt id="connections.TwitterConnect.get">
<tt class="descname">get</tt><big>(</big><em>mode=None</em><big>)</big><a class="headerlink" href="#connections.TwitterConnect.get" title="Permalink to this definition">¶</a></dt>
<dd><p>Wrapper method. If this class is called with GET method the request
is forwarded to the post method.</p>
</dd></dl>

<dl class="method">
<dt id="connections.TwitterConnect.post">
<tt class="descname">post</tt><big>(</big><em>mode=None</em><big>)</big><a class="headerlink" href="#connections.TwitterConnect.post" title="Permalink to this definition">¶</a></dt>
<dd><p>Called when class is called woth POST method.
Contact twitter host and request authorization url and redirect it.
The authorization url callback this and user information are received and saved
into Users table.
Redirect to the root of web app with a connected variable in GET method,
the variable contains a message related the result of the execution.</p>
</dd></dl>

</dd></dl>

</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">The <cite>connections</cite> module content</a><ul>
<li><a class="reference internal" href="#the-unsubscribethis-function">The <tt class="docutils literal"><span class="pre">unsubscribeThis</span></tt> function</a></li>
<li><a class="reference internal" href="#the-pshbconnect-class">The <tt class="docutils literal"><span class="pre">PSHBConnect</span></tt> class</a></li>
<li><a class="reference internal" href="#the-twitterconnect-class">The <tt class="docutils literal"><span class="pre">TwitterConnect</span></tt> class</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="callback.html"
                        title="previous chapter">The <cite>callback</cite> module content</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="dbclasses.html"
                        title="next chapter">The <cite>dbclasses</cite> module content</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="_sources/connections.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" size="18" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="dbclasses.html" title="The dbclasses module content"
             >next</a> |</li>
        <li class="right" >
          <a href="callback.html" title="The callback module content"
             >previous</a> |</li>
        <li><a href="index.html">buzzRTShare v1.0.1 documentation</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2010, Giuseppe Buzzanca (PiDy) &lt; giuseppebuzzanca@gmail.com &gt; .
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.4.
    </div>
  </body>
</html>